package com.zw.gulimall.order.test;

import com.zw.common.entity.order.OrderEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MqListener {

    @RabbitListener(queues = "hello-java-equeque")
    public void listener(Message message, OrderEntity order) {
      log.info("收到的消息是:{},{}",order.getOrderSn(),order.getAutoConfirmDay());
    }
}
